package com.iot.user.controller;

import com.iot.commonutils.utils.Result;
import com.iot.user.entity.User;
import com.iot.user.service.UpdateUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 更新用户个人资料
 */
@RestController
@RequestMapping("/userInfo")
public class UserInfoController {
    @Autowired
    private UpdateUserInfoService updateUserInfoService;

    @PostMapping("/change")
    public Result userInfoChange(@RequestBody User user) {
        return updateUserInfoService.updateUserInfo(user);
    }
}
